<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Array对象</title>
</head>
<body>
    <script>
        let arr = [1,2,3,4,5];
        let sum = 0;
        for (const number of arr) {
            sum += number
        }
        console.log(sum)
    </script>
</body>
</html>